package com.example.demomybatisplus.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.demomybatisplus.enums.SexEnum;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
//@TableName("t_user")
public class User {
    //@TableId注解的value属性用于指定主键的字段
//    @TableId(type = IdType.AUTO)

    private Long id;

    private String name;

    private Integer age;

    private String email;

    private SexEnum sex;

    @TableLogic
    private Integer isDeleted;

    public User(String name, int age, String email) {
        this.name=name;
        this.age=age;
        this.email=email;
    }
}
